const fs = require('fs');
const path = require('path');
const mime = require('mime-types'); //需npm安装
module.exports={
    upLoad:async (ctx,next)=>{
        let result= await new Promise((resolve,reject)=>{
            if (ctx.req.file){
                resolve('http:127.0.0.1:3000/'+ctx.req.file.path)
            } else {
               reject(false)
            }
        })
        console.log(result)
        ctx.body=result
    }

}

